package com.bitdf.txing.product.feign;

import com.bitdf.txing.common.utils.R;
import com.bitdf.txing.product.config.FeignInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(
        name = "tx-mall-ware",                 // 服务名称
        configuration = FeignInterceptor.class       // 请求拦截器 （关键代码）
)
public interface ProdcutWareFeignService {
    @PostMapping("txing/mall/ware/sku/hasstock")
    R getSkusHasStock(@RequestBody List<Long> skuIds);

    /**
     * 测试
     * @return
     */
    @GetMapping("txing/mall/ware/ceshi/seata")
    R testSeata();
}
